import { Space, Table } from 'antd';
import Modal_1 from './Modal_1/Modal_1';
import Modal_2 from './Modal_2/Modal_2';
import Modal_3 from './Modal_3/Modal_3';

const columns =[
    {
        title: '角色名称',
        dataIndex: 'role_name',
        key: 'role_name'
    },
    {
        title: '角色描述',
        dataIndex: 'role_description',
        key: 'role_description'
    },
    {
        title: '角色账号',
        dataIndex: 'admin',
        key: 'admin'
    },
    {
        title: '角色密码',
        dataIndex: 'password',
        key: 'password'
    },
    {
        title: '创建时间',
        dataIndex: 'Creation_time',
        key: 'Creation_time'
    },
    {
        title: '角色状态',
        dataIndex: 'admin_state',
        key: 'admin_state'
    },
    {
        width:100,
        title: '操作',
        dataIndex: 'operation',
        key: 'operation',
        render: (text,record) => (
            <Space size="middle">
                <Modal_1 name={record}/>
                <Modal_2 name={record}/>
                <Modal_3/>
            </Space>    
        )
    }
]
const data=[
    {
        key:1,
        role_name:'超级管理员',
        role_description:'拥有所有权限',
        admin:'123456',
        password:'admin123456',
        Creation_time:'2018-11-08 19:22:09',
        admin_state:'启用',
        operation:'查看'
    },
    {
        key:2,
        role_name:'系统管理员',
        role_description:'拥有系统权限',
        admin:'123456',
        password:'admin123456',
        Creation_time:'2018-11-08 19:22:09',
        admin_state:'启用',
        operation:'查看'
    },
    {
        key:3,
        role_name:'财务管理员',
        role_description:'拥有财务权限',
        admin:'123456',
        password:'admin123456',
        Creation_time:'2018-11-08 19:22:09',
        admin_state:'启用',
        operation:'查看'
    },
]
function RoleTab() {
    return <div>
        <Table columns={columns} dataSource={data} />
    </div>
}
export default RoleTab;